Skip to content

ait: add react token streaming examples#3268

Open
owenpearson wants to merge 1 commit intomainfrom
react-token-streaming
Open

ait: add react token streaming examples#3268
owenpearson wants to merge 1 commit intomainfrom
react-token-streaming

Conversation

@owenpearson
Copy link
Member

@owenpearson owenpearson commented Mar 12, 2026

AIT-253

  • Adds React token streaming examples to the token streaming docs based on what was agreed in aitdr-004

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 34024b1f-47b3-4b96-bb80-80de1061df26

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch react-token-streaming

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@VeskeR VeskeR added review-app Create a Heroku review app and removed review-app Create a Heroku review app labels Mar 19, 2026
@owenpearson owenpearson force-pushed the react-token-streaming branch from d879231 to 4259e13 Compare March 24, 2026 12:51
@owenpearson owenpearson requested a review from VeskeR March 24, 2026 12:56
@owenpearson owenpearson force-pushed the react-token-streaming branch from 4259e13 to 1170435 Compare March 24, 2026 16:14
const hydrated = useRef(false);

// Subscribe to live messages and get the history function
const { history } = useChannel('persisted:{{RANDOM_CHANNEL_NAME}}', 'token', (message) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, just noticed, the js/python/java examples for persisted history include // Use a channel in a namespace called 'persisted', which has persistence enabled to emphasize the expected channel configuration.
Maybe add a similar comment for react examples too:

// Ensure the outer ChannelProvider uses a channel in a 'persisted' namespace, which has persistence enabled

const hydrated = useRef(false);

// Subscribe to live messages and get the history function
const { history } = useChannel('persisted:{{RANDOM_CHANNEL_NAME}}', 'token', (message) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto persisted comment

@owenpearson owenpearson requested a review from VeskeR March 24, 2026 16:14
@m-hulbert m-hulbert removed the request for review from GregHolmes March 24, 2026 16:49
@owenpearson owenpearson force-pushed the react-token-streaming branch from 1170435 to 0c10eea Compare March 25, 2026 22:14
@owenpearson owenpearson force-pushed the react-token-streaming branch from 0c10eea to c0b3211 Compare March 25, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

2 participants